﻿using MySql.Data.MySqlClient;
using newBlog.CenterInc.model;
using newBlog.inc.SqlINC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace newBlog.CenterInc.Ctrltor
{
    public class Grade_inc
    {
        sqlConnect Conn = new sqlConnect();
        public List<Grade_Dao> gradeList() {
            List<Grade_Dao> list = new List<Grade_Dao>();
            string sql = "SELECT * FROM blog_grade";
            MySqlDataReader dr = Conn.DataListAll(sql);
            while (dr.Read()) {
                Grade_Dao grade_Dao = new Grade_Dao(dr.GetString(0),dr.GetString(1));
                list.Add(grade_Dao);
            }
            return list;
        }
    }
}